package qsc.algorithm.dijkstra;

import java.util.Arrays;

/**
 * @auther QiuShangcheng
 * @create 2021/4/23
 */
public class Graph {
    private char[] vertex;//节点数组
    private int[][] matrix;//邻接矩阵
    private int edgeNum;//边的数量

    public Graph(char[] vertex, int[][] matrix, int edgeNum) {
        this.vertex = vertex;
        this.matrix = matrix;
        this.edgeNum = edgeNum;
    }

    public Graph() {

    }

    //打印
    public void show(){
        for (int[] link:matrix
             ) {
            System.out.println(Arrays.toString(link));
        }
    }

    public char[] getVertex() {
        return vertex;
    }

    public Graph setVertex(char[] vertex) {
        this.vertex = vertex;
        return this;
    }

    public int[][] getMatrix() {
        return matrix;
    }

    public Graph setMatrix(int[][] matrix) {
        this.matrix = matrix;
        return this;
    }

    public int getEdgeNum() {
        return edgeNum;
    }

    public Graph setEdgeNum(int edgeNum) {
        this.edgeNum = edgeNum;
        return this;
    }
}
